package com.cs.controller.utils;

import com.cs.pojo.Goods;
import com.cs.service.image.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;

public class ImageUpload {
    @Autowired
    private ImageService imageService;
    public ArrayList<String> policy(MultipartFile[] files) throws Exception{
        ArrayList<String> imagesList = new ArrayList<>();
        //获取上传文件 MultipartFile
        //返回图片在oss上的路径
        ArrayList<String> list = imageService.uploadFileAvatar(files);
        return list;
    }
}
